/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jtwittconsolepackage;

import java.util.HashMap;

/**
 * Stores the names of apps that are used from the twitter-users.
 *
 */
public class TwitterAppRepository
{
    private HashMap<String, String> twitterAppRepository;
    private static TwitterAppRepository twitterAppRepositoryInstance = null;
    
    public static TwitterAppRepository getInstance()
    {
    	if(twitterAppRepositoryInstance == null)
        {
            twitterAppRepositoryInstance = new TwitterAppRepository();
        }
    	
    	return twitterAppRepositoryInstance;
    }

    private TwitterAppRepository()
    {
        twitterAppRepository = new HashMap<String, String>();
    }

    public boolean contains(String key)
    {
        return twitterAppRepository.containsKey(key);
    }

    public String get(String key)
    {
        return twitterAppRepository.get(key);
    }

    public void put(String key, String value)
    {
        twitterAppRepository.put(key, value);
    }
}
